Waveshaper
Two code examples are provided.
- Clipper: his simply clips an audio signal so that all output samples are in the range -1 to +1
- BitCrusher: This quantises samples to be represented with 2^N levels, where N is some number of bits. It reduces the perceived bit depth in a signal.
Code examples correspond to examples from Chapter 12 in the book 'Working with the Web Audio API'.
Feel free to contact me at joshua.reiss@qmul.ac.uk